#pragma once

#include "Code.h"
#include "Scope.h"

namespace Signal
{
	class Environment
	{
		public:

		Environment ();

		void add_class (std::shared_ptr<Class> _class);
		void add_func  (std::shared_ptr<Function> func);

		std::shared_ptr<Class>    find_class (const std::string& name);
		std::shared_ptr<Function> find_func  (const std::string& name);

		std::shared_ptr<Object> obj_nil ();
		std::shared_ptr<Object> obj_true ();
		std::shared_ptr<Object> obj_false ();

		private:

		std::vector<std::shared_ptr<Class>>	   m_classes;
		std::vector<std::shared_ptr<Function>> m_funcs;

		// Built-in primitive objects
		std::shared_ptr<Object> m_obj_nil;
		std::shared_ptr<Object> m_obj_true;
		std::shared_ptr<Object> m_obj_false;
	};
}